package com.btobtob.a.biz.user.dto.clientobject;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.google.type.DateTime;
import lombok.*;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Date;

@Data
@ToString
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class WeatherForecastCO {

//    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private Calendar zonedDatetime;

    private Date localDatetime;

    private String localDate;

    private int temperatureC;  
    
    private String summary;  
      
    @Setter(AccessLevel.NONE)
    @Getter(AccessLevel.NONE)
    private int temperatureF;

    public int getTemperatureF() {
        temperatureF = 32 + (int)(temperatureC / 0.5556);
        return temperatureF;
    }


//    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSSz")
//    private ZonedDateTime zonedDatetime;

    //    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
//    private LocalDateTime LocalDatetime;

//    @JsonFormat(pattern = "yyyy-MM-dd")
//    private LocalDate localDate;

}
